package com.pan.behavioral.Interpreter.exprerssoin.impl;

import com.pan.behavioral.Interpreter.exprerssoin.Expression;
import com.pan.behavioral.Interpreter.exprerssoin.NonTerminalExpression;

public class PlusExpression extends NonTerminalExpression {
    public PlusExpression(Expression leftExpression, Expression rightExpression) {
        super(leftExpression, rightExpression);
    }

    public PlusExpression() {
    }

    @Override
    public Integer interpreter() {
        int i = (Integer) super.leftExpression.interpreter() + (Integer) super.rightExpression.interpreter();
        return i;
    }
}
